package com.nuckly.news.ui

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.nuckly.news.R
import com.nuckly.news.common.addFragment
import com.nuckly.news.databinding.ActivityMainBinding
import com.nuckly.news.ui.fragment.NewsFeedFragment
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class MainActivity : AppCompatActivity() {

    private lateinit var binding: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)
        addNewsFeedFragment()
    }

    private fun addNewsFeedFragment() {
        addFragment(R.id.fragment_container, NewsFeedFragment.newIntent())
    }
}